package uit.comstore.model.blo;

import java.util.List;
import org.hibernate.Session;
import uit.comstore.model.entity.BillDetail;
import uit.comstore.utils.HibernateSessionFactory;

public class BillDetailBLO {
	@SuppressWarnings("unchecked")
	public List<BillDetail> list() {
		List<BillDetail> billDetails = null;
		Session session = HibernateSessionFactory.getSessionFactory().getCurrentSession();
		session.beginTransaction();
		billDetails = (List<BillDetail>) session.createQuery("from BillDetail").list();
		session.getTransaction().commit();
		return billDetails;
	}
}
